home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmPT_307_zModelessDialog < prev    next >
Encoding:
Text File  |  1990-03-23  |  1.5 KB  |  66 lines

  1. { %filename% -- modeless dialog }
  2. { Created %date% %time% by AppMaker }
  3.  
  4. {    We recommend that you not modify this module and instead modify        }
  5. {    its subclass, %dlogname%.  The 'z' prefix on this module marks%        %}
  6. {    a module which is likely to be regenerated by AppMaker after you    }
  7. {    make changes to the user interface.  The modules without the 'z'    }
  8. {    prefix will not be regenerated by AppMaker unless you delete them.    }
  9. {    Using a separate subclass to override the AppMaker-generated code    }
  10. {    lets you regenerate code without losing your hand-coded changes.    } 
  11.  
  12. Unit %unitname%;
  13. Interface
  14.  
  15. Uses
  16.     TCL,
  17.     AMCL,
  18.     z%AppName%Intf,
  19.     %AppName%Intf;
  20.  
  21. {----------}
  22. Implementation
  23.  
  24. const
  25.     %dlogname%ID%    %= %rsrcID%;        {resource ID for DLOG template}
  26.  
  27. {----------}
  28. Procedure Z%dlogname%.I%dlogname%    (aSupervisor:    CApplication);
  29. var
  30.     itsDialog:        CDialog;
  31.     enclosure:        CView;
  32.     supervisor:        CBureaucrat;
  33.     itsMainPane:    CPane;
  34.     aGroup:            CRadioGroup;
  35. Begin
  36.     inherited IDirector (aSupervisor);
  37.  
  38.     New (itsDialog);
  39.     itsDialog.IDialog (%rsrcID%, gDesktop, self);
  40.     itsWindow := itsDialog;
  41.  
  42.     enclosure := itsDialog;
  43.     supervisor := self;
  44.     %for each item gen create%
  45. End; {I%dlogname%}
  46.     
  47. %for each item gen zMake%
  48. {----------}
  49. Procedure Z%dlogname%.CloseWind (theWindow:    CWindow);
  50. Begin
  51.     theWindow.Hide;
  52. End; {CloseWind}
  53.     
  54. {----------}
  55. Procedure Z%dlogname%.DoCommand (theCommand: longint);
  56. Begin
  57.     case theCommand of
  58.          cmdClose: begin
  59.                 CloseWind(itsWindow);
  60.             end;
  61.         otherwise
  62.             inherited DoCommand (theCommand);
  63.     end; {case}
  64. End; {DoCommand}
  65.     
  66. End. {%unitname%}